package v1

import (
	"gf_blog_admin/internal/model"
	"github.com/gogf/gf/v2/frame/g"
)

type AuthRegisterReq struct {
	g.Meta `path:"/auth/register" method:"post" tags:"auth" sm:"注册" noAuth:"true" noCan:"true"`
	model.AuthRegisterInput
}

type AuthRegisterRes struct{}

type AuthLoginReq struct {
	g.Meta `path:"/auth/login" method:"post" tags:"auth" sm:"登录" noAuth:"true" noCan:"true"`
	model.AuthLoginInPut
}

type AuthLoginRes struct {
	AccessToken string `json:"access_token" dc:"在需要鉴权的接口中header加入Authorization"`
	ExpiresIn   int64  `json:"expires_in" dc:"token有效期"`
}

type AuthSMSLoginReq struct {
	g.Meta `path:"/auth/sms_login" method:"post" tags:"auth" sm:"短信登录" noAuth:"true" noCan:"true"`
	model.AuthSMSLoginInPut
}

type AuthSMSLoginRes struct {
	AccessToken string `json:"access_token" dc:"在需要鉴权的接口中header加入Authorization"`
	ExpiresIn   int64  `json:"expires_in" dc:"token有效期"`
}

type AuthSMSCodeReq struct {
	g.Meta `path:"/auth/sms_code" method:"post" tags:"auth" sm:"发送短信" noAuth:"true" noCan:"true"`
	model.AuthSMSCodeInput
}

type AuthSMSCodeRes struct{}

type AuthForgotPwdReq struct {
	g.Meta `path:"/auth/forgot_pwd" method:"post" tags:"auth" sm:"忘记密码" noAuth:"true" noCan:"true"`
	model.AuthForgotPwdInput
}

type AuthForgotPwdRes struct{}

type AuthLogoutReq struct {
	g.Meta `path:"/auth/logout" method:"post" tags:"auth" sm:"退出登录" noCan:"true"`
}

type AuthLogoutRes struct{}
